<template>
	<view>
        <web-view :src="webUrl"></web-view>
	</view>
</template>

<script>
    const api = require("@/static/js/api.js")
    const utils = require("@/static/js/utils.js")
    import {
        mapState,
        mapMutations,
        mapActions
    } from 'vuex';
    let that = null
	import Config from  "@/config.js"; 
    
	export default {
		data() {
			return {
                webUrl:""
			};
		},
        
        computed: {
            ...mapState({
                hasLogin: state => state.userInfo.hasLogin,
                isAuthPhone: state => state.userInfo.isAuthPhone,
                isAuthUserInfo: state => state.userInfo.isAuthUserInfo, 
                isSeller: state => state.userInfo.isSeller,
                sellerObj: state => state.userInfo.sellerObj,
                buyerObj: state => state.userInfo.buyerObj,
                shopInfo: state => state.userInfo.shopInfo,
            }),
        },
        
        onLoad(options) {
            that = this;
            if (options.id ==1){
                uni.setNavigationBarTitle({
                    title:'隐私协议',
                })
                that.webUrl = Config.appAgreementPrivacyUrl
            }else{
                uni.setNavigationBarTitle({
                    title:'用户协议',
                })
                that.webUrl = Config.appAgreementUserUrl
            }
            
        },
        onShow() {
      
        },
        methods:{ 
            ...mapMutations(['setUserInfo', 'setLoginStatus', 'setUserId',"setOrigin"]),
            
        }
	}
</script>

<style lang="scss">

</style>
